package com.mkvld.appietijdenv2.data;

import java.util.Calendar;
import java.util.Date;

public class Holiday {
	private int year, week, day;
	private String name;
	public Holiday(int year, int week, int day, String name) {
		super();
		this.year = year;
		this.week = week;
		this.day = day;
		this.name = name;
	}
	public int getYear() {
		return year;
	}
	public int getWeek() {
		return week;
	}
	public int getDay() {
		return day;
	}
	public String getName() {
		return name;
	}
	
	public Date getDate() {
		Calendar cal = Calendar.getInstance(Utils.locale);
		cal.set(Calendar.YEAR, year);
		
		cal.set(Calendar.DAY_OF_WEEK, (day + 2) % 7);
		cal.set(Calendar.WEEK_OF_YEAR, week + 1);
		cal.set(Calendar.HOUR_OF_DAY, 0);
		cal.set(Calendar.MINUTE, 0);
		cal.set(Calendar.SECOND, 0);
		cal.set(Calendar.MILLISECOND, 0);		
		return cal.getTime();
	}
}
